/**
 * Created by yoyoyk on 2017/6/2.
 */
/**
 * Created by Dalyn on 2017/3/16.
 */
import Relay from "react-relay";

export default class orderTradeTree extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { orderTradeTree }`;
    }

    getVariables() {
        return {
            argsInput: {
                orderId: this.props.orderId,
                enId:this.props.enId
            }
        };
    }

    getFatQuery() {
        return Relay.QL`
        fragment on orderTradeTreePayload {
         orderTradeTree{
                   token
                    userId
                    value
                    errorCode
                    subOrders{
                        oid
                        signedContract
                        orderType
                        sendQuanty
                        acceptQuanty
                        orderGoodsNum
                        account
                        partBName
                        partAName
                        orderGoodss{
                            productName
                        }
                    }
                    order{
                        oid
                        signedContract
                        orderType
                        sendQuanty
                        acceptQuanty
                        orderGoodsNum
                        account
                        partBName
                        partAName
                        orderGoodss{
                            productName
                        }
                    }
                    totalResult
                    authorityId
                    id
                
                }
      
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on orderTradeTreePayload {
                orderTradeTree{
                              token
                    userId
                    value
                    errorCode
                    subOrders{
                        oid
                        signedContract
                        orderType
                        sendQuanty
                        acceptQuanty
                        orderGoodsNum
                        account
                        partBName
                        partAName
                        orderGoodss{
                            productName
                        }
                    }
                    order{
                        oid
                        signedContract
                        orderType
                        sendQuanty
                        acceptQuanty
                        orderGoodsNum
                        account
                        partBName
                        partAName
                        orderGoodss{
                            productName
                        }
                    }
                    totalResult
                    authorityId
                    id
                
                }
      
                }
            `]
        }];
    }

}
